/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package AccesoDatos.Persistencia.Entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author sebaxtian
 */
@Entity
@Table(name = "PALABRA")
@NamedQueries({
    @NamedQuery(name = "EPalabra.findAll", query = "SELECT e FROM EPalabra e"),
    @NamedQuery(name = "EPalabra.findByIdpalabra", query = "SELECT e FROM EPalabra e WHERE e.idpalabra = :idpalabra"),
    @NamedQuery(name = "EPalabra.findByNombre", query = "SELECT e FROM EPalabra e WHERE e.nombre = :nombre")})
public class EPalabra implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDPALABRA")
    private Integer idpalabra;
    @Basic(optional = false)
    @Column(name = "NOMBRE")
    private String nombre;

    public EPalabra() {
    }

    public EPalabra(Integer idpalabra) {
        this.idpalabra = idpalabra;
    }

    public EPalabra(Integer idpalabra, String nombre) {
        this.idpalabra = idpalabra;
        this.nombre = nombre;
    }

    public Integer getIdpalabra() {
        return idpalabra;
    }

    public void setIdpalabra(Integer idpalabra) {
        this.idpalabra = idpalabra;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpalabra != null ? idpalabra.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EPalabra)) {
            return false;
        }
        EPalabra other = (EPalabra) object;
        if ((this.idpalabra == null && other.idpalabra != null) || (this.idpalabra != null && !this.idpalabra.equals(other.idpalabra))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "AccesoDatos.Persistencia.Entidad.EPalabra[idpalabra=" + idpalabra + "]";
    }

}
